import { request, hotelRequest } from '@/sheep/request';

export default {
	// 抢红包首页   周
	
	lotteryIndex: (params) =>
	    request({
	        url: '/lottery/api/index',
	        method: 'GET',
			custom: {
				showLoading: false,
				showError: false,
			},
	    }),
		
		
	// 往期记录   周
	
	lotteryPeriods: (params) =>
	    request({
	        url: '/lottery/api/index/periods',
	        method: 'GET',
			custom: {
				showLoading: false,
				showError: false,
			},
	    }),	
		
	// 奖池内容   周
	
	lotteryPool: (params) =>
	    request({
	        url: '/lottery/api/index/pool',
	        method: 'GET',
			params,
	    }),
			
	// 中奖记录   周
	
	lotteryOpenLog: (params) =>
	    request({
	        url: '/lottery/api/index/openLog',
	        method: 'GET',
			params,
			custom: {
				showLoading: false,
				showError: false,
			},
	    }),
			
	// 抢红包   周
	
	lotteryApply: (params) =>
	    request({
	        url: '/lottery/api/index/apply',
	        method: 'POST',
			data:{
				...params
			}
	    }),
		
	
	
	// 抢红包首页   日
	
	lotteryuserDay: (params) =>
	    request({
	        url: '/lottery/api/userDay',
	        method: 'GET',
			custom: {
				showLoading: false,
				showError: false,
			},
	    }),
	
	
	// 中奖记录   日
	
	lotteryuserDayopenLog: (params) =>
	    request({
	        url: '/lottery/api/userDay/openLog',
	        method: 'GET',
			custom: {
				showLoading: false,
				showError: false,
			},
			params
	    }),
	
	
	// 往期奖池   日
	
	lotteryuserDaywqjc: (params) =>
	    request({
	        url: '/lottery/api/userDay/' + params,
	        method: 'GET',
			custom: {
				showLoading: false,
				showError: false,
			}
	    }),
	
	
	// 抽奖   日
	
	lotteryuserDayapply: (params) =>
	    request({
	        url: '/lottery/api/userDay/apply',
	        method: 'POST',
			custom: {
				showLoading: false,
				showError: false,
			},
			data:params
	    }),
	
	
	
	// 往期记录   日
	
	lotteryuserDayPeriods: (params) =>
	    request({
	        url: '/lottery/api/userDay/periods',
	        method: 'GET',
			custom: {
				showLoading: false,
				showError: false,
			},
			params
	    }),
	
	// 用户抽奖记录   日
	
	lotteryuserDayuserLotteryLog: (params) =>
	    request({
	        url: '/lottery/api/userDay/userLotteryLog',
	        method: 'GET',
			custom: {
				showLoading: false,
				showError: false,
			},
			params
	    }),
	
	
	// // 用户抽奖记录   日
	
	lotteryuserDaypool: (params) =>
	    request({
	        url: '/lottery/api/userDay/pool',
	        method: 'GET',
			custom: {
				showLoading: false,
				showError: false,
			},
			params
	    }),


	// 商家抢红包首页-周
	lotterysupplierDay: (params) =>
		request({
			url: '/lottery/api/supplierDay',
			method: 'GET',
			custom: {
				showLoading: false,
				showError: false,
			},
		}),

	// 商家中奖记录-周
	lotterysupplierDayopenLog: (params) =>
		request({
			url: '/lottery/api/supplierDay/openLog',
			method: 'GET',
			custom: {
				showLoading: false,
				showError: false,
			},
			params
		}),

	// 商家往期奖池-周
	lotterysupplierDaywqjc: (params) =>
		request({
			url: '/lottery/api/supplierDay/' + params,
			method: 'GET',
			custom: {
				showLoading: false,
				showError: false,
			}
		}),

	// 商家抽奖-周
	lotterysupplierDayapply: (params) =>
		request({
			url: '/lottery/api/supplierDay/apply',
			method: 'POST',
			custom: {
				showLoading: false,
				showError: false,
			},
			data:params
		}),

	// 商家往期记录-周
	lotterysupplierDayPeriods: (params) =>
		request({
			url: '/lottery/api/supplierDay/periods',
			method: 'GET',
			custom: {
				showLoading: false,
				showError: false,
			},
			params
		}),

	// 商家奖池内容-周
	lotterysupplierDayPool: (params) =>
		request({
			url: '/lottery/api/supplierDay/pool',
			method: 'GET',
			custom: {
				showLoading: false,
				showError: false,
			},
			params
		}),


	// 商家用户抽奖记录-周
	lotterysupplierDayuserLotteryLog: (params) =>
		request({
			url: '/lottery/api/supplierDay/userLotteryLog',
			method: 'GET',
			custom: {
				showLoading: false,
				showError: false,
			},
			params
		}),

	// 核销（核销员使用）
	lotterycodeuse: (params) =>
		request({
			url: `/lottery/api/code/user/${params}`,
			method: 'POST',
		}),

	// 核销详情
	lotterycode: (params) =>
		request({
			url: `/lottery/api/code/${params}`,
			method: 'GET',
		}),

	// 核销详情
	lotteryonlinePrizeDetail: (params) =>
		request({
			url: `/lottery/api/Code/onlinePrizeDetail${params}`,
			method: 'GET',
		}),
		
	// 更新线上核销收货地址
	lotteryonlinePrizeAddress: (data) =>
		request({
			url: `/lottery/api/Code/onlinePrizeAddress`,
			method: 'POST',
			data
		}),

};
